<%@ Page Language="C#" MasterPageFile="AdminMasterPage.master" AutoEventWireup="true" CodeFile="ProjectsAdmin.aspx.cs" Inherits="Admin_ProjectsAdmin" Title="Untitled Page" ValidateRequest="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<br /><br />

        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"
        DataSourceID="SqlDataSource2" AllowPaging="True" AllowSorting="True" EnableSortingAndPagingCallbacks="True" Width="579px" DataKeyNames="id">
            <Columns>
                <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"
                    SortExpression="id" />
                <asp:BoundField DataField="ProName" HeaderText="ProName" SortExpression="ProName" />
                <asp:BoundField DataField="ProCatagory" HeaderText="ProCatagory" SortExpression="ProCatagory" />
                <asp:BoundField DataField="ProDisplaySerial" HeaderText="ProDisplaySerial" SortExpression="ProDisplaySerial" />
                <asp:BoundField DataField="ProURL" HeaderText="ProURL" SortExpression="ProURL" />
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
            </Columns>
    </asp:GridView>
    <br />
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:Personal %>"
        DeleteCommand="DELETE FROM [Projects] WHERE [id] = @id" InsertCommand="INSERT INTO [Projects] ([ProName], [ProCaption], [ProContent], [ProTechLang], [ProDatabase], [ProType], [ProTools], [ProURL], [ProCatagory], [ProDisplaySerial]) VALUES (@ProName, @ProCaption, @ProContent, @ProTechLang, @ProDatabase, @ProType, @ProTools, @ProURL, @ProCatagory, @ProDisplaySerial)"
        SelectCommand="SELECT * FROM [Projects]" UpdateCommand="UPDATE [Projects] SET [ProName] = @ProName, [ProCaption] = @ProCaption, [ProContent] = @ProContent, [ProTechLang] = @ProTechLang, [ProDatabase] = @ProDatabase, [ProType] = @ProType, [ProTools] = @ProTools, [ProURL] = @ProURL, [ProCatagory] = @ProCatagory, [ProDisplaySerial] = @ProDisplaySerial WHERE [id] = @id">
        <DeleteParameters>
            <asp:Parameter Name="id" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="ProName" Type="String" />
            <asp:Parameter Name="ProCaption" Type="String" />
            <asp:Parameter Name="ProContent" Type="String" />
            <asp:Parameter Name="ProTechLang" Type="String" />
            <asp:Parameter Name="ProDatabase" Type="String" />
            <asp:Parameter Name="ProType" Type="String" />
            <asp:Parameter Name="ProTools" Type="String" />
            <asp:Parameter Name="ProURL" Type="String" />
            <asp:Parameter Name="ProCatagory" Type="String" />
            <asp:Parameter Name="ProDisplaySerial" Type="String" />
            <asp:Parameter Name="id" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="ProName" Type="String" />
            <asp:Parameter Name="ProCaption" Type="String" />
            <asp:Parameter Name="ProContent" Type="String" />
            <asp:Parameter Name="ProTechLang" Type="String" />
            <asp:Parameter Name="ProDatabase" Type="String" />
            <asp:Parameter Name="ProType" Type="String" />
            <asp:Parameter Name="ProTools" Type="String" />
            <asp:Parameter Name="ProURL" Type="String" />
            <asp:Parameter Name="ProCatagory" Type="String" />
            <asp:Parameter Name="ProDisplaySerial" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:DetailsView ID="DetailsView2" runat="server" AllowPaging="True" AutoGenerateRows="False" DataSourceID="SqlDataSource2" Height="6px" Width="592px" DataKeyNames="id">
        <Fields>
            <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"
                SortExpression="id" />
            <asp:BoundField DataField="ProName" HeaderText="ProName" SortExpression="ProName" />
            <asp:BoundField DataField="ProCaption" HeaderText="ProCaption" SortExpression="ProCaption" />
            <asp:TemplateField HeaderText="ProContent" SortExpression="ProContent">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Height="90px" Text='<%# Bind("ProContent") %>'
                        TextMode="MultiLine" Width="580px"></asp:TextBox>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Height="90px" Text='<%# Bind("ProContent") %>'
                        TextMode="MultiLine" Width="580px"></asp:TextBox>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("ProContent") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="ProTechLang" HeaderText="ProTechLang" SortExpression="ProTechLang" />
            <asp:BoundField DataField="ProDatabase" HeaderText="ProDatabase" SortExpression="ProDatabase" />
            <asp:BoundField DataField="ProType" HeaderText="ProType" SortExpression="ProType" />
            <asp:BoundField DataField="ProTools" HeaderText="ProTools" SortExpression="ProTools" />
            <asp:BoundField DataField="ProURL" HeaderText="ProURL" SortExpression="ProURL" />
            <asp:BoundField DataField="ProCatagory" HeaderText="ProCatagory" SortExpression="ProCatagory" />
            <asp:BoundField DataField="ProDisplaySerial" HeaderText="ProDisplaySerial" SortExpression="ProDisplaySerial" />
            <asp:CommandField ShowEditButton="True" ShowInsertButton="True" />
        </Fields>
    </asp:DetailsView>
    <br />
    <asp:Panel ID="Panel1" runat="server" Height="85px" Width="346px">
        <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource2"
            DataTextField="ProName" DataValueField="id">
        </asp:DropDownList><br />
        <br />
        <asp:FileUpload ID="FileUpload1" runat="server" /><br />
        <br />
        <asp:Button ID="btnUpload" runat="server" OnClick="btnUpload_Click" Text="Button" /></asp:Panel>
    <br />
 
</asp:Content>